﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Drawing;

namespace UserControlLinksMenu
{
    public partial class LinksMenu : System.Web.UI.UserControl
    {
        private List<KeyValuePair<string, string>> linksData = new List<KeyValuePair<string, string>>();

        public Color FontColor
        {
            get;
            set;
        }

        public string Font
        {
            get;
            set;
        }

        public string[] FontFamily
        {
            get
            {
                return this.Font.Split(',');
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Page_Prerender(object sender, EventArgs e)
        {
            this.dataListMenu.DataSource = linksData;
            this.dataListMenu.DataBind();
        }

        public void AddItem(string name, string value)
        {
            linksData.Add(new KeyValuePair<string, string>(name, value));
        }
    }
}